#include<bits/stdc++.h>
#define MAX 1010
#define ERROR -1
using namespace std;
class MyQueue
{
	private:
		int vals[MAX];
		int front, end, size;
	public:
		MyQueue()
		{
			front = end = size = 0;
		}
		bool pop()
		{
			if(size <= 0)
				return false;
			front++;
			size--;
			return true;
		}
		int getFront()
		{
			if(size <= 0)
				return ERROR;
			return vals[front];
		}
		bool push(int val)
		{
			if(size >= MAX)
				return false;
			vals[end++ % MAX] = val;
			size++;
		}
};

int main()
{
	MyQueue mq;
	mq.push(1);
	cout << mq.getFront() << endl;
	mq.pop();
	cout << mq.getFront() << endl;
	return 0;
} 
